package com.bingxue.edu.management.system.model.req;

import jakarta.validation.constraints.*;
import org.hibernate.validator.constraints.Length;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * 创建或修改资源信息
 *
 * @author panbo
 * @since 2024/07/21 22:36
 */
@Data
@Schema(description = "创建或修改资源信息")
public class ResourceReq {

    @Schema(description = "资源模块")
    @NotBlank(message = "资源模块不能为空")
    @Length(max = 32, message = "资源模块长度不能超过 {max} 个字符")
    private String module;

    @Schema(description = "资源编码")
    @NotBlank(message = "资源编码不能为空")
    @Length(max = 64, message = "资源编码长度不能超过 {max} 个字符")
    private String code;

    @Schema(description = "名称")
    @NotBlank(message = "名称不能为空")
    @Length(max = 64, message = "名称长度不能超过 {max} 个字符")
    private String name;

    @Schema(description = "描述")
    @Length(max = 255, message = "描述长度不能超过 {max} 个字符")
    private String description;
}
